{% extends "base.html" %}
    {% load widget_tweaks %}
    {% block title %}{{title}}{% endblock %}
    {% block custom_style %}
        <link href="/static/css/registration.css" rel="stylesheet">
    {% endblock %}
    {% block content %}
    <div class="container">
        {% if registration_succeeded %}
            <div style="sans">
                Thank you for registering!
            </div>
        {% else %}
            {% if form.errors %}
                <div style="margin-top:50px; text-align:center;" class="alert alert-danger col-4-lg">
                    <i class="icon-exclamation-sign"></i> Your username and password didn't match, please try again.
                    </div>
            {% endif %}
            <form  action='/register/patient' method='post' class="form-registration">
                <h2 class="sans form-login-heading">Registration</h2>
                {% for field in user_form %}
                    {% render_field field class+="form-control sans" placeholder=field.label %} 
                {% endfor %}
                {% for field in user_profile_form %}
                    {% render_field field class+="form-control sans" placeholder=field.label %} 
                {% endfor %}
                {% for field in patient_form %}
                    {% render_field field class+="form-control sans" placeholder=field.label %} 
                {% endfor %}
                {% csrf_token %}
                <button class="btn btn-lg btn-success btn-block" type="submit"><i class="icon-plus"></i> Register</button>
            </form>
        {% endif %}
    </div>
    {% endblock %}
    {% block custom_scripts %}{% endblock %}
